package com.link4a.doms.exception;

public class ValidationException extends Exception {

	private static final long serialVersionUID = -1579855577958986443L;
	
	//数据或关键字段重复
	public static final int DATA_DUPLICATED = 101;
	//约束条件不满足
	public static final int CONSTRAINT_VIALOATION = 102;
	//允许被忽略的警告
	public static final int CAN_IGNORE_WARNING =103;
	
	private int code;
	private Object data;
	
	public ValidationException(int code) {
		super();
		this.code = code;
	}
	
	public ValidationException(int code, Object data) {
		super();
		this.code = code;
		this.data = data;
	}

	public int getCode() {
		return code;
	}
	
	public Object getData() {
		return data;
	}
	
	public void setData(Object data) {
		this.data = data;
	}

}
